package com.zhdl.modules.prefiresys.service;

import com.project.common.service.BaseService;
import com.zhdl.modules.prefiresys.entity.DefAreaAlarmRec;
import com.zhdl.modules.prefiresys.web.request.AlarmRecListRequest;
import com.zhdl.modules.prefiresys.web.request.EventAlarmInfoReq;
import com.zhdl.modules.prefiresys.web.response.AlarmRecListResp;
import com.zhdl.modules.prefiresys.web.response.EventAlarmInfoResp;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 报警记录
 */
public interface DefAreaAlarmRecService extends BaseService<DefAreaAlarmRec, String> {

    Page<EventAlarmInfoResp> findAlarmRecordsByEventId(EventAlarmInfoReq request, Pageable pageable);

    /**
     * 查询所有报警记录
     *
     * @return
     */
    Page<AlarmRecListResp> findAllRecord(AlarmRecListRequest request, Pageable pageable);

    /**
     * 统计近七日报警数据总数
     *
     * @return
     */
    List<Object[]> statAgoWeekAlarmCount();

    List<Object[]> statAgoWeekAlarmCount_1();

    DefAreaAlarmRec findNewRecords();

    /**
     * 统计最近一个月各等级报警数据
     */
    public List<Object[]> statMonthAlarmNo1();

    public List<Object[]> statMonthAlarmNo2();

    public List<Object[]> statMonthAlarmNo3();

}
